<?php
/** 初始化项目 */
require '../../app/app.php';
/** 初始化数据库 */
use app\util\Mysql;
$database = Mysql::init();


if (isset($_GET["text_id"])) {
    $text_id = $_GET["text_id"];
    $text_name = $database->get("text_main", ["textname"], ["tid" => $text_id]);
    $text_name = $text_name["textname"];
    $text_main = $database->get("text_main", ["main"], ["tid" => $text_id]);
    $text_main = $text_main["main"];
    $text_file = $database->get("more_file", ["name"], ["text_id" => $text_id]);
    $text_file = $text_file["name"];

    $out = array("text_name" => $text_name, "text_main" => $text_main, "text_file" => $text_file);
    echo json_encode($out);
    // echo $out;
}





?>